import { createRequest } from './request'

import { getServiceEnvConfig } from '~/.env-config'

const { url, proxyPattern } = getServiceEnvConfig(import.meta.env)

const isHttpProxy = import.meta.env.VITE_HTTP_PROXY === 'Y'

export const JBoltApi = createRequest({
    baseURL: isHttpProxy ? proxyPattern : url,
    timeout: 10000,
    withCredentials: false
})
